<template>
	<view class="content">
		我的DMEO-1
		<button @click="testHttp" style="width: 400rpx;">Mock网络</button>
		<text id="res" style="margin-top: unset">{{response}}</text>
	</view>
</template>

<script>
	import {
		TestApi
	} from '../../../api/testapi.js'
	const testApi = new TestApi()
	export default {
		data() {
			return {
				response: '网络返回结果',
				title: 'YobertJomi'
			};
		},
		onLoad: function() {
			console.log('onLoad')
		},
		methods: {
			testHttp() {
				console.log('testHttp')
				testApi.qryTest({
					showType: '2'
				}).then(data => {
					console.log('网络请求 进入then')

					let responsedddd = '网络请求 进入then'
					console.log(error)
				}).catch(e => {
					console.log('网络请求 进入catch')
					this.response = '网络请求 进入catch'
					console.log(this.response)
				})
			}
		}
	}
</script>

<style>
	.content {
		text-align: center;
		height: 400rpx;
		margin-top: 200rpx;
	}
</style>
